//
//  Feedback.m
//  massage
//
//  Created by 李志权 on 2017/1/20.
//  Copyright © 2017年 李志权. All rights reserved.
//

#import "Feedback.h"

@interface Feedback ()<UITextFieldDelegate,UITextViewDelegate>
/**电话View*/
@property (weak, nonatomic) IBOutlet UIView *phoneView;
@property (weak, nonatomic) IBOutlet UITextField *phoneField;
/**邮箱View*/
@property (weak, nonatomic) IBOutlet UIView *emaliView;
@property (weak, nonatomic) IBOutlet UITextField *emaliField;
/**QQview*/
@property (weak, nonatomic) IBOutlet UIView *QQView;
@property (weak, nonatomic) IBOutlet UITextField *QQField;
/**反馈View*/
@property (weak, nonatomic) IBOutlet UIView *feedbackView;
@property (weak, nonatomic) IBOutlet UITextView *feedbackText;
/***意见反馈Label*/
@property (weak, nonatomic) IBOutlet UILabel *feedbackLbael;
/**确定按钮*/
@property (weak, nonatomic) IBOutlet UIButton *ConfirmBtn;

@end

@implementation Feedback
- (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    TWSetKeyandTextFiledHeight(self.view,0);
}
- (void)viewDidLoad {
    [super viewDidLoad];
    self.navigationItem.title = @"意见反馈";
    [self.phoneView setShearRound:6 masksToBounds:YES borderWidth:1 borderColor:GrayTooLight];
    [self.emaliView setShearRound:6 masksToBounds:YES borderWidth:1 borderColor:GrayTooLight];
    [self.QQView setShearRound:6 masksToBounds:YES borderWidth:1 borderColor:GrayTooLight];
    [self.feedbackView setShearRound:6 masksToBounds:YES borderWidth:1 borderColor:GrayTooLight];
    [self.ConfirmBtn setShearRound:6 masksToBounds:YES borderWidth:0 borderColor:nil];
    
    // Do any additional setup after loading the view from its nib.
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/
- (BOOL)textFieldShouldReturn:(UITextField *)textField
{
    [self.view endEditing:YES];
    return YES;
}
- (BOOL)textView:(UITextView *)textView shouldChangeTextInRange:(NSRange)range replacementText:(NSString *)text
{
    if ([text isEqualToString:@"\n"]) {
        [self.view endEditing:YES];
    }
    return YES;
}
@end
